package com.medaxis.hpams.sso.domain.dto;

import com.medaxis.hpams.sso.domain.Role;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;

import java.util.ArrayList;
import java.util.List;

@Data
@NoArgsConstructor
public class RoleDto extends Role {
    public static boolean isAdmin(Long roleId){
        return roleId != null && 1L == roleId;
    }


    @ApiModelProperty(value = "菜单组")
    private List<Long> menuIds;
    @ApiModelProperty(value = "数据权限组")
    private List<Long> groupIds;
    public static Role ToRole(RoleDto dto){
        return (Role)dto;
    }

    public RoleDto(Long id){
        this.setRoleId(id);
    }


}
